home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / ColorSync 3.0 Mac SDK / Interfaces / CMApplication.a next >
Encoding:
Text File  |  1999-10-28  |  62.9 KB  |  2,174 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Color Matching Interfaces
  5. ;
  6. ;    Version:    Technology:    ColorSync 3.0
  7. ;                Release:    ColorSync 3.0 SDK for use with Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1992, 1994-1999 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  18. __CMAPPLICATION__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  24.     include 'Quickdraw.a'
  25.     ENDIF
  26.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  27.     include 'Files.a'
  28.     ENDIF
  29.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  30.     include 'Printing.a'
  31.     ENDIF
  32.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  33.     include 'CMICCProfile.a'
  34.     ENDIF
  35.     IF &TYPE('__DISPLAYS__') = 'UNDEFINED' THEN
  36.     include 'Displays.a'
  37.     ENDIF
  38.  
  39.  
  40. kDefaultCMMSignature            EQU        'appl'
  41. ;  Macintosh 68K trap word 
  42.  
  43. cmTrap                            EQU        $ABEE
  44.  
  45. ;  PicComment IDs 
  46.  
  47. cmBeginProfile                    EQU        220
  48. cmEndProfile                    EQU        221
  49. cmEnableMatching                EQU        222
  50. cmDisableMatching                EQU        223
  51. cmComment                        EQU        224
  52. ;  PicComment selectors for cmComment 
  53.  
  54. cmBeginProfileSel                EQU        0
  55. cmContinueProfileSel            EQU        1
  56. cmEndProfileSel                    EQU        2
  57. cmProfileIdentifierSel            EQU        3
  58.  
  59. ;  Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  60.  
  61. cmMatchCMMType                    EQU        $00000001
  62. cmMatchApplProfileVersion        EQU        $00000002
  63. cmMatchDataType                    EQU        $00000004
  64. cmMatchDeviceType                EQU        $00000008
  65. cmMatchDeviceManufacturer        EQU        $00000010
  66. cmMatchDeviceModel                EQU        $00000020
  67. cmMatchDeviceAttributes            EQU        $00000040
  68. cmMatchFlags                    EQU        $00000080
  69. cmMatchOptions                    EQU        $00000100
  70. cmMatchWhite                    EQU        $00000200
  71. cmMatchBlack                    EQU        $00000400
  72. ;  Defines for version 2.0 CMSearchRecord.searchMask 
  73.  
  74. cmMatchAnyProfile                EQU        $00000000
  75. cmMatchProfileCMMType            EQU        $00000001
  76. cmMatchProfileClass                EQU        $00000002
  77. cmMatchDataColorSpace            EQU        $00000004
  78. cmMatchProfileConnectionSpace    EQU        $00000008
  79. cmMatchManufacturer                EQU        $00000010
  80. cmMatchModel                    EQU        $00000020
  81. cmMatchAttributes                EQU        $00000040
  82. cmMatchProfileFlags                EQU        $00000080
  83. ;  Result codes 
  84.  
  85.                                                             ; General Errors 
  86. cmProfileError                    EQU        -170
  87. cmMethodError                    EQU        -171
  88. cmMethodNotFound                EQU        -175                ; CMM not present 
  89. cmProfileNotFound                EQU        -176                ; Responder error 
  90. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  91. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  92. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  93. cmCantDeleteProfile                EQU        -180                ; Responder error 
  94. cmUnsupportedDataType            EQU        -181                ; Responder error 
  95. cmNoCurrentProfile                EQU        -182                ; Responder error 
  96.                                                             ; Profile Access Errors 
  97. cmElementTagNotFound            EQU        -4200
  98. cmIndexRangeErr                    EQU        -4201                ; Tag index out of range 
  99. cmCantDeleteElement                EQU        -4202
  100. cmFatalProfileErr                EQU        -4203
  101. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  102. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  103. cmCantCopyModifiedV1Profile        EQU        -4215                ; Illegal to copy version 1 profiles that have been modified 
  104.                                                             ; Profile Search Errors 
  105. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  106. cmSearchError                    EQU        -4207
  107. cmErrIncompatibleProfile        EQU        -4208                ; Other ColorSync Errors 
  108. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  109. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  110. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  111. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  112. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  113. cmRangeOverFlow                    EQU        -4214                ; Color conversion warning that some output color values over/underflowed and were clipped 
  114. cmNamedColorNotFound            EQU        -4216                ; NamedColor not found 
  115. cmCantGamutCheckError            EQU        -4217                ; Gammut checking not supported by this ColorWorld 
  116. ;  deviceType values for ColorSync 1.0 Device Profile access 
  117.  
  118. cmSystemDevice                    EQU        'sys '
  119. cmGDevice                        EQU        'gdev'
  120. ;  Commands for CMFlattenUPP(…) 
  121.  
  122. cmOpenReadSpool                    EQU        1
  123. cmOpenWriteSpool                EQU        2
  124. cmReadSpool                        EQU        3
  125. cmWriteSpool                    EQU        4
  126. cmCloseSpool                    EQU        5
  127. ;  Flags for PostScript-related functions 
  128.  
  129. cmPS7bit                        EQU        1
  130. cmPS8bit                        EQU        2
  131. ;  Flags for profile embedding functions 
  132.  
  133. cmEmbedWholeProfile                EQU        $00000000
  134. cmEmbedProfileIdentifier        EQU        $00000001
  135. ;  Commands for CMAccessUPP(…) 
  136.  
  137. cmOpenReadAccess                EQU        1
  138. cmOpenWriteAccess                EQU        2
  139. cmReadAccess                    EQU        3
  140. cmWriteAccess                    EQU        4
  141. cmCloseAccess                    EQU        5
  142. cmCreateNewAccess                EQU        6
  143. cmAbortWriteAccess                EQU        7
  144. cmBeginAccess                    EQU        8
  145. cmEndAccess                        EQU        9
  146.  
  147. ;  Abstract data type for memory-based Profile 
  148.  
  149.  
  150. ;  Abstract data type for Profile search result 
  151.  
  152.  
  153. ;  Abstract data type for BeginMatching(…) reference 
  154.  
  155.  
  156. ;  Abstract data type for ColorWorld reference 
  157.  
  158.  
  159. ;  Caller-supplied flatten function 
  160. ;  Caller-supplied progress function for Bitmap & PixMap matching routines 
  161. ;  Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines 
  162. ;  Caller-supplied filter function for Profile search 
  163. ;  Caller-supplied function for profile access 
  164. ; typedef long                             CMError
  165.  
  166. ;  For 1.0 and 2.0 profile header variants 
  167. ;  CMAppleProfileHeader 
  168. CMAppleProfileHeader    RECORD 0
  169. cm1                         ds        CMHeader        ; offset: $0 (0)
  170.                          ORG 0
  171. cm2                         ds        CM2Header        ; offset: $0 (0)
  172. sizeof                     EQU *                    ; size:   $80 (128)
  173.                         ENDR
  174. ;  Param for CWConcatColorWorld(…) 
  175. CMConcatProfileSet        RECORD 0
  176. keyIndex                 ds.w    1                ; offset: $0 (0)        ;  Zero-based 
  177. count                     ds.w    1                ; offset: $2 (2)        ;  Min 1 
  178. profileSet                 ds.l    1                ; offset: $4 (4) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  179. sizeof                     EQU *                    ; size:   $8 (8)
  180.                         ENDR
  181.  
  182. ;  NCMConcatProfileSpec Tags 
  183.  
  184. kNoTransform                    EQU        0                    ; Not used 
  185. kUseAtoB                        EQU        1                    ; Use 'A2B*' tag from this profile or equivalent 
  186. kUseBtoA                        EQU        2                    ; Use 'B2A*' tag from this profile or equivalent 
  187. kUseBtoB                        EQU        3                    ; Use 'pre*' tag from this profile or equivalent 
  188.                                                             ; For typical device profiles the following synonyms may be useful 
  189. kDeviceToPCS                    EQU        1                    ; Device Dependent to Device Independent 
  190. kPCSToDevice                    EQU        2                    ; Device Independent to Device Dependent 
  191. kPCSToPCS                        EQU        3                    ; Independent, through device's gamut 
  192. kUseProfileIntent                EQU        $FFFFFFFF            ; For renderingIntent in NCMConcatProfileSpec    
  193. ;  NCMConcatProfileSpec 
  194. NCMConcatProfileSpec    RECORD 0
  195. renderingIntent             ds.l    1                ; offset: $0 (0)        ;  renderingIntent override        
  196. transformTag             ds.l    1                ; offset: $4 (4)        ;  transformTag, defined above    
  197. profile                     ds.l    1                ; offset: $8 (8)        ;  profile 
  198. sizeof                     EQU *                    ; size:   $C (12)
  199.                         ENDR
  200. ;  NCMConcatProfileSet 
  201. NCMConcatProfileSet        RECORD 0
  202. cmm                         ds.l    1                ; offset: $0 (0)        ;  e.g. 'KCMS', 'appl', ...  uniquely ids the cmm, or 0000 
  203. flags                     ds.l    1                ; offset: $4 (4)        ;  specify quality, lookup only, no gamut checking ... 
  204. flagsMask                 ds.l    1                ; offset: $8 (8)        ;  which bits of 'flags' to use to override profile 
  205. profileCount             ds.l    1                ; offset: $C (12)        ;  how many ProfileSpecs in the following set 
  206. profileSpecs             ds        NCMConcatProfileSpec ; offset: $10 (16) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  207. sizeof                     EQU *                    ; size:   $1C (28)
  208.                         ENDR
  209. ;  ColorSync color data types 
  210. CMRGBColor                RECORD 0
  211. red                         ds.w    1                ; offset: $0 (0)        ;  0..65535 
  212. green                     ds.w    1                ; offset: $2 (2)
  213. blue                     ds.w    1                ; offset: $4 (4)
  214. sizeof                     EQU *                    ; size:   $6 (6)
  215.                         ENDR
  216. CMCMYKColor                RECORD 0
  217. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  218. magenta                     ds.w    1                ; offset: $2 (2)
  219. yellow                     ds.w    1                ; offset: $4 (4)
  220. black                     ds.w    1                ; offset: $6 (6)
  221. sizeof                     EQU *                    ; size:   $8 (8)
  222.                         ENDR
  223. CMCMYColor                RECORD 0
  224. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  225. magenta                     ds.w    1                ; offset: $2 (2)
  226. yellow                     ds.w    1                ; offset: $4 (4)
  227. sizeof                     EQU *                    ; size:   $6 (6)
  228.                         ENDR
  229. CMHLSColor                RECORD 0
  230. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  231. lightness                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  232. saturation                 ds.w    1                ; offset: $4 (4)        ;  0..65535 
  233. sizeof                     EQU *                    ; size:   $6 (6)
  234.                         ENDR
  235. CMHSVColor                RECORD 0
  236. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  237. saturation                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  238. value                     ds.w    1                ; offset: $4 (4)        ;  0..65535 
  239. sizeof                     EQU *                    ; size:   $6 (6)
  240.                         ENDR
  241. CMLabColor                RECORD 0
  242. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  243. a                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  244. b                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  245. sizeof                     EQU *                    ; size:   $6 (6)
  246.                         ENDR
  247. CMLuvColor                RECORD 0
  248. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  249. u                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  250. v                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  251. sizeof                     EQU *                    ; size:   $6 (6)
  252.                         ENDR
  253. CMYxyColor                RECORD 0
  254. capY                     ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..1 
  255. x                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to 0..1 
  256. y                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to 0..1 
  257. sizeof                     EQU *                    ; size:   $6 (6)
  258.                         ENDR
  259. CMGrayColor                RECORD 0
  260. gray                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  261. sizeof                     EQU *                    ; size:   $2 (2)
  262.                         ENDR
  263. CMMultichannel5Color    RECORD 0
  264. components                 ds.b    5                ; offset: $0 (0)        ;  0..255 
  265.                          ORG 6
  266. sizeof                     EQU *                    ; size:   $6 (6)
  267.                         ENDR
  268. CMMultichannel6Color    RECORD 0
  269. components                 ds.b    6                ; offset: $0 (0)        ;  0..255 
  270. sizeof                     EQU *                    ; size:   $6 (6)
  271.                         ENDR
  272. CMMultichannel7Color    RECORD 0
  273. components                 ds.b    7                ; offset: $0 (0)        ;  0..255 
  274.                          ORG 8
  275. sizeof                     EQU *                    ; size:   $8 (8)
  276.                         ENDR
  277. CMMultichannel8Color    RECORD 0
  278. components                 ds.b    8                ; offset: $0 (0)        ;  0..255 
  279. sizeof                     EQU *                    ; size:   $8 (8)
  280.                         ENDR
  281. CMNamedColor            RECORD 0
  282. namedColorIndex             ds.l    1                ; offset: $0 (0)        ;  0..a lot 
  283. sizeof                     EQU *                    ; size:   $4 (4)
  284.                         ENDR
  285. CMColor                    RECORD 0
  286. rgb                         ds        CMRGBColor        ; offset: $0 (0)
  287.                          ORG 0
  288. hsv                         ds        CMHSVColor        ; offset: $0 (0)
  289.                          ORG 0
  290. hls                         ds        CMHLSColor        ; offset: $0 (0)
  291.                          ORG 0
  292. XYZ                         ds        CMXYZColor        ; offset: $0 (0)
  293.                          ORG 0
  294. Lab                         ds        CMLabColor        ; offset: $0 (0)
  295.                          ORG 0
  296. Luv                         ds        CMLuvColor        ; offset: $0 (0)
  297.                          ORG 0
  298. Yxy                         ds        CMYxyColor        ; offset: $0 (0)
  299.                          ORG 0
  300. cmyk                     ds        CMCMYKColor        ; offset: $0 (0)
  301.                          ORG 0
  302. cmy                         ds        CMCMYColor        ; offset: $0 (0)
  303.                          ORG 0
  304. gray                     ds        CMGrayColor        ; offset: $0 (0)
  305.                          ORG 0
  306. mc5                         ds        CMMultichannel5Color ; offset: $0 (0)
  307.                          ORG 0
  308. mc6                         ds        CMMultichannel6Color ; offset: $0 (0)
  309.                          ORG 0
  310. mc7                         ds        CMMultichannel7Color ; offset: $0 (0)
  311.                          ORG 0
  312. mc8                         ds        CMMultichannel8Color ; offset: $0 (0)
  313.                          ORG 0
  314. namedColor                 ds        CMNamedColor    ; offset: $0 (0)
  315.                          ORG 8
  316. sizeof                     EQU *                    ; size:   $8 (8)
  317.                         ENDR
  318. CMProfileSearchRecord    RECORD 0
  319. header                     ds        CMHeader        ; offset: $0 (0)
  320. fieldMask                 ds.l    1                ; offset: $40 (64)
  321. reserved                 ds.l    2                ; offset: $44 (68)
  322. sizeof                     EQU *                    ; size:   $4C (76)
  323.                         ENDR
  324. ; typedef struct CMProfileSearchRecord * CMProfileSearchRecordPtr
  325.  
  326. ; typedef CMProfileSearchRecordPtr *    CMProfileSearchRecordHandle
  327.  
  328. ;  Search definition for 2.0 
  329. CMSearchRecord            RECORD 0
  330. CMMType                     ds.l    1                ; offset: $0 (0)
  331. profileClass             ds.l    1                ; offset: $4 (4)
  332. dataColorSpace             ds.l    1                ; offset: $8 (8)
  333. profileConnectionSpace     ds.l    1                ; offset: $C (12)
  334. deviceManufacturer         ds.l    1                ; offset: $10 (16)
  335. deviceModel                 ds.l    1                ; offset: $14 (20)
  336. deviceAttributes         ds.l    2                ; offset: $18 (24)
  337. profileFlags             ds.l    1                ; offset: $20 (32)
  338. searchMask                 ds.l    1                ; offset: $24 (36)
  339. filter                     ds.l    1                ; offset: $28 (40)
  340. sizeof                     EQU *                    ; size:   $2C (44)
  341.                         ENDR
  342. ;  CMMInfo structure 
  343. CMMInfo                    RECORD 0
  344. dataSize                 ds.l    1                ; offset: $0 (0)        ;  Size of this structure - compatibility
  345. CMMType                     ds.l    1                ; offset: $4 (4)        ;  Signature, e.g. 'KCMS'
  346. CMMMfr                     ds.l    1                ; offset: $8 (8)        ;  Vendor, e.g. 'appl'
  347. CMMVersion                 ds.l    1                ; offset: $C (12)        ;  cmm version number
  348. ASCIIName                 ds.b    32                ; offset: $10 (16)        ;  pascal string - name
  349. ASCIIDesc                 ds.b    256                ; offset: $30 (48)        ;  pascal string - description or copyright
  350. UniCodeNameCount         ds.l    1                ; offset: $130 (304)    ;  count of UniChars in following array
  351. UniCodeName                 ds.w    32                ; offset: $134 (308)    ;  the name in UniCode chars
  352. UniCodeDescCount         ds.l    1                ; offset: $174 (372)    ;  count of UniChars in following array
  353. UniCodeDesc                 ds.w    256                ; offset: $178 (376)    ;  the description in UniCode chars
  354. sizeof                     EQU *                    ; size:   $378 (888)
  355.                         ENDR
  356. ;  GetCWInfo structures 
  357. CMMInfoRecord            RECORD 0
  358. CMMType                     ds.l    1                ; offset: $0 (0)
  359. CMMVersion                 ds.l    1                ; offset: $4 (4)
  360. sizeof                     EQU *                    ; size:   $8 (8)
  361.                         ENDR
  362. CMCWInfoRecord            RECORD 0
  363. cmmCount                 ds.l    1                ; offset: $0 (0)
  364. cmmInfo                     ds.b    2 * CMMInfoRecord.sizeof ; offset: $4 (4)
  365. sizeof                     EQU *                    ; size:   $14 (20)
  366.                         ENDR
  367. ;  profile identifier structures 
  368. CMProfileIdentifier        RECORD 0
  369. profileHeader             ds        CM2Header        ; offset: $0 (0)
  370. calibrationDate             ds        CMDateTime        ; offset: $80 (128)
  371. ASCIIProfileDescriptionLen  ds.l 1                ; offset: $8C (140)
  372. ASCIIProfileDescription     ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  variable length 
  373.                          ORG 146
  374. sizeof                     EQU *                    ; size:   $92 (146)
  375.                         ENDR
  376. ; typedef struct CMProfileIdentifier *    CMProfileIdentifierPtr
  377.  
  378. ;  packing formats 
  379.  
  380. cmNoColorPacking                EQU        $0000
  381. cmWord5ColorPacking                EQU        $0500
  382. cmWord565ColorPacking            EQU        $0600
  383. cmLong8ColorPacking                EQU        $0800
  384. cmLong10ColorPacking            EQU        $0A00
  385. cmAlphaFirstPacking                EQU        $1000
  386. cmOneBitDirectPacking            EQU        $0B00
  387. cmAlphaLastPacking                EQU        $0000
  388. cm8_8ColorPacking                EQU        $2800
  389. cm16_8ColorPacking                EQU        $2000
  390. cm24_8ColorPacking                EQU        $2100
  391. cm32_8ColorPacking                EQU        $0800
  392. cm40_8ColorPacking                EQU        $2200
  393. cm48_8ColorPacking                EQU        $2300
  394. cm56_8ColorPacking                EQU        $2400
  395. cm64_8ColorPacking                EQU        $2500
  396. cm32_16ColorPacking                EQU        $2600
  397. cm48_16ColorPacking                EQU        $2900
  398. cm64_16ColorPacking                EQU        $2A00
  399. cm32_32ColorPacking                EQU        $2700
  400. cmLittleEndianPacking            EQU        $4000
  401. cmReverseChannelPacking            EQU        $8000
  402. ;  colorspace masks 
  403.  
  404. cmColorSpaceSpaceMask            EQU        $0000007F
  405. cmColorSpaceAlphaMask            EQU        $00000080
  406. cmColorSpaceSpaceAndAlphaMask    EQU        $000000FF
  407. cmColorSpacePackingMask            EQU        $0000FF00
  408. cmColorSpaceReservedMask        EQU        $FFFF0000
  409. ;  general colorspaces 
  410.  
  411. cmNoSpace                        EQU        0
  412. cmRGBSpace                        EQU        1
  413. cmCMYKSpace                        EQU        2
  414. cmHSVSpace                        EQU        3
  415. cmHLSSpace                        EQU        4
  416. cmYXYSpace                        EQU        5
  417. cmXYZSpace                        EQU        6
  418. cmLUVSpace                        EQU        7
  419. cmLABSpace                        EQU        8
  420. cmReservedSpace1                EQU        9
  421. cmGraySpace                        EQU        10
  422. cmReservedSpace2                EQU        11
  423. cmGamutResultSpace                EQU        12
  424. cmNamedIndexedSpace                EQU        16
  425. cmMCFiveSpace                    EQU        17
  426. cmMCSixSpace                    EQU        18
  427. cmMCSevenSpace                    EQU        19
  428. cmMCEightSpace                    EQU        20
  429. cmAlphaSpace                    EQU        $80
  430. cmRGBASpace                        EQU        129
  431. cmGrayASpace                    EQU        138
  432. ;  supported CMBitmapColorSpaces - Each of the following is a 
  433. ;  combination of a general colospace and a packing formats. 
  434. ;  Each can also be or'd with cmReverseChannelPacking. 
  435.  
  436. cmGray8Space                    EQU        10250
  437. cmGrayA16Space                    EQU        8330
  438. cmGray16Space                    EQU        10
  439. cmGrayA32Space                    EQU        138
  440. cmGray16LSpace                    EQU        16394
  441. cmGrayA32LSpace                    EQU        16522
  442. cmRGB16Space                    EQU        1281
  443. cmRGB16LSpace                    EQU        17665
  444. cmRGB565Space                    EQU        1537
  445. cmRGB565LSpace                    EQU        17921
  446. cmRGB24Space                    EQU        8449
  447. cmRGB32Space                    EQU        2049
  448. cmRGB48Space                    EQU        10497
  449. cmRGB48LSpace                    EQU        26881
  450. cmARGB32Space                    EQU        6273
  451. cmARGB64Space                    EQU        14977
  452. cmARGB64LSpace                    EQU        31361
  453. cmRGBA32Space                    EQU        2177
  454. cmRGBA64Space                    EQU        10881
  455. cmRGBA64LSpace                    EQU        27265
  456. cmCMYK32Space                    EQU        2050
  457. cmCMYK64Space                    EQU        10754
  458. cmCMYK64LSpace                    EQU        27138
  459. cmHSV32Space                    EQU        2563
  460. cmHLS32Space                    EQU        2564
  461. cmYXY32Space                    EQU        2565
  462. cmXYZ24Space                    EQU        8454
  463. cmXYZ32Space                    EQU        2566
  464. cmXYZ48Space                    EQU        10502
  465. cmXYZ48LSpace                    EQU        26886
  466. cmLUV32Space                    EQU        2567
  467. cmLAB24Space                    EQU        8456
  468. cmLAB32Space                    EQU        2568
  469. cmLAB48Space                    EQU        10504
  470. cmLAB48LSpace                    EQU        26888
  471. cmGamutResult1Space                EQU        $0B0C
  472. cmNamedIndexed32Space            EQU        $2710
  473. cmNamedIndexed32LSpace            EQU        $6710
  474. cmMCFive8Space                    EQU        $2211
  475. cmMCSix8Space                    EQU        $2312
  476. cmMCSeven8Space                    EQU        $2413
  477. cmMCEight8Space                    EQU        $2514
  478.  
  479. ; typedef UInt32                         CMBitmapColorSpace
  480.  
  481. CMBitmap                RECORD 0
  482. image                     ds.l    1                ; offset: $0 (0)
  483. width                     ds.l    1                ; offset: $4 (4)
  484. height                     ds.l    1                ; offset: $8 (8)
  485. rowBytes                 ds.l    1                ; offset: $C (12)
  486. pixelSize                 ds.l    1                ; offset: $10 (16)
  487. space                     ds.l    1                ; offset: $14 (20)
  488. user1                     ds.l    1                ; offset: $18 (24)
  489. user2                     ds.l    1                ; offset: $1C (28)
  490. sizeof                     EQU *                    ; size:   $20 (32)
  491.                         ENDR
  492.  
  493. ;  Classic Print Manager Stuff 
  494.     IF TARGET_OS_MAC THEN
  495.  
  496. enableColorMatchingOp            EQU        12
  497. registerProfileOp                EQU        13
  498.     ENDIF    ; TARGET_OS_MAC
  499. ;  Profile Locations 
  500.  
  501. CS_MAX_PATH                        EQU        256
  502.  
  503. cmNoProfileBase                    EQU        0
  504. cmFileBasedProfile                EQU        1
  505. cmHandleBasedProfile            EQU        2
  506. cmPtrBasedProfile                EQU        3
  507. cmProcedureBasedProfile            EQU        4
  508. cmPathBasedProfile                EQU        5
  509. cmBufferBasedProfile            EQU        6
  510. CMFileLocation            RECORD 0
  511. spec                     ds        FSSpec            ; offset: $0 (0)
  512. sizeof                     EQU *                    ; size:   $46 (70)
  513.                         ENDR
  514. CMHandleLocation        RECORD 0
  515. h                         ds.l    1                ; offset: $0 (0)
  516. sizeof                     EQU *                    ; size:   $4 (4)
  517.                         ENDR
  518. CMPtrLocation            RECORD 0
  519. p                         ds.l    1                ; offset: $0 (0)
  520. sizeof                     EQU *                    ; size:   $4 (4)
  521.                         ENDR
  522. CMProcedureLocation        RECORD 0
  523. proc                     ds.l    1                ; offset: $0 (0)
  524. refCon                     ds.l    1                ; offset: $4 (4)
  525. sizeof                     EQU *                    ; size:   $8 (8)
  526.                         ENDR
  527. CMPathLocation            RECORD 0
  528. path                     ds.b    256                ; offset: $0 (0)
  529. sizeof                     EQU *                    ; size:   $100 (256)
  530.                         ENDR
  531. CMBufferLocation        RECORD 0
  532. buffer                     ds.l    1                ; offset: $0 (0)
  533. size                     ds.l    1                ; offset: $4 (4)
  534. sizeof                     EQU *                    ; size:   $8 (8)
  535.                         ENDR
  536. CMProfLoc                RECORD 0
  537. fileLoc                     ds        CMFileLocation ; offset: $0 (0)
  538.                          ORG 0
  539. handleLoc                 ds        CMHandleLocation ; offset: $0 (0)
  540.                          ORG 0
  541. ptrLoc                     ds        CMPtrLocation    ; offset: $0 (0)
  542.                          ORG 0
  543. procLoc                     ds        CMProcedureLocation ; offset: $0 (0)
  544.                          ORG 0
  545. pathLoc                     ds        CMPathLocation ; offset: $0 (0)
  546.                          ORG 0
  547. bufferLoc                 ds        CMBufferLocation ; offset: $0 (0)
  548.                          ORG 256
  549. sizeof                     EQU *                    ; size:   $100 (256)
  550.                         ENDR
  551. CMProfileLocation        RECORD 0
  552. locType                     ds.w    1                ; offset: $0 (0)
  553. u                         ds        CMProfLoc        ; offset: $2 (2)
  554. sizeof                     EQU *                    ; size:   $102 (258)
  555.                         ENDR
  556.     IF TARGET_OS_MAC THEN
  557.  
  558. cmOriginalProfileLocationSize    EQU        72
  559. cmCurrentProfileLocationSize    EQU        258
  560.     ELSE
  561.  
  562. cmOriginalProfileLocationSize    EQU        258
  563. cmCurrentProfileLocationSize    EQU        258
  564.     ENDIF    ; TARGET_OS_MAC
  565. ;  Struct and enums used for Profile iteration 
  566.  
  567. cmProfileIterateDataVersion1    EQU        $00010000
  568. cmProfileIterateDataVersion2    EQU        $00020000
  569. CMProfileIterateData    RECORD 0
  570. dataVersion                 ds.l    1                ; offset: $0 (0)        ;  cmProfileIterateDataVersion2 
  571. header                     ds        CM2Header        ; offset: $4 (4)
  572. code                     ds.w    1                ; offset: $84 (132)
  573. name                     ds        Str255            ; offset: $86 (134)
  574. location                 ds        CMProfileLocation ; offset: $186 (390)
  575. uniCodeNameCount         ds.l    1                ; offset: $288 (648)
  576. uniCodeName                 ds.l    1                ; offset: $28C (652)
  577. asciiName                 ds.l    1                ; offset: $290 (656)
  578. makeAndModel             ds.l    1                ; offset: $294 (660)
  579. sizeof                     EQU *                    ; size:   $298 (664)
  580.                         ENDR
  581. ;  Caller-supplied callback function for Profile & CMM iteration 
  582. ;  Profile file and element access 
  583. ;
  584. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  585. ;
  586.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  587.         Macro
  588.         _CMNewProfile
  589.             move.l              #$0008001B,D0
  590.             dc.w                $ABEE
  591.         EndM
  592.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  593.         IMPORT_CFM_FUNCTION CMNewProfile
  594.     ENDIF
  595.  
  596. ;
  597. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  598. ;
  599.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  600.         Macro
  601.         _CMOpenProfile
  602.             move.l              #$0008001C,D0
  603.             dc.w                $ABEE
  604.         EndM
  605.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  606.         IMPORT_CFM_FUNCTION CMOpenProfile
  607.     ENDIF
  608.  
  609. ;
  610. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  611. ;
  612.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  613.         Macro
  614.         _CMCloseProfile
  615.             move.l              #$0004001D,D0
  616.             dc.w                $ABEE
  617.         EndM
  618.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  619.         IMPORT_CFM_FUNCTION CMCloseProfile
  620.     ENDIF
  621.  
  622. ;
  623. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  624. ;
  625.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  626.         Macro
  627.         _CMUpdateProfile
  628.             move.l              #$00040034,D0
  629.             dc.w                $ABEE
  630.         EndM
  631.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  632.         IMPORT_CFM_FUNCTION CMUpdateProfile
  633.     ENDIF
  634.  
  635. ;
  636. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  637. ;
  638.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  639.         Macro
  640.         _CMCopyProfile
  641.             move.l              #$000C0025,D0
  642.             dc.w                $ABEE
  643.         EndM
  644.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  645.         IMPORT_CFM_FUNCTION CMCopyProfile
  646.     ENDIF
  647.  
  648. ;
  649. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  650. ;
  651.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  652.         Macro
  653.         _CMValidateProfile
  654.             move.l              #$000C0026,D0
  655.             dc.w                $ABEE
  656.         EndM
  657.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  658.         IMPORT_CFM_FUNCTION CMValidateProfile
  659.     ENDIF
  660.  
  661. ;
  662. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  663. ;
  664.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  665.         Macro
  666.         _CMGetProfileLocation
  667.             move.l              #$0008003C,D0
  668.             dc.w                $ABEE
  669.         EndM
  670.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  671.         IMPORT_CFM_FUNCTION CMGetProfileLocation
  672.     ENDIF
  673.  
  674. ;
  675. ; pascal CMError NCMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile, UInt32 *locationSize)
  676. ;
  677.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  678.         Macro
  679.         _NCMGetProfileLocation
  680.             move.l              #$000C0059,D0
  681.             dc.w                $ABEE
  682.         EndM
  683.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  684.         IMPORT_CFM_FUNCTION NCMGetProfileLocation
  685.     ENDIF
  686.  
  687. ;
  688. ; pascal CMError CMFlattenProfile(CMProfileRef prof, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  689. ;
  690.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  691.         Macro
  692.         _CMFlattenProfile
  693.             move.l              #$00140031,D0
  694.             dc.w                $ABEE
  695.         EndM
  696.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  697.         IMPORT_CFM_FUNCTION CMFlattenProfile
  698.     ENDIF
  699.  
  700.     IF TARGET_OS_MAC THEN
  701. ;
  702. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  703. ;
  704.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  705.         Macro
  706.         _CMUnflattenProfile
  707.             move.l              #$00100032,D0
  708.             dc.w                $ABEE
  709.         EndM
  710.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  711.         IMPORT_CFM_FUNCTION CMUnflattenProfile
  712.     ENDIF
  713.  
  714.     ENDIF    ; TARGET_OS_MAC
  715. ;
  716. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  717. ;
  718.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  719.         Macro
  720.         _CMGetProfileHeader
  721.             move.l              #$00080039,D0
  722.             dc.w                $ABEE
  723.         EndM
  724.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  725.         IMPORT_CFM_FUNCTION CMGetProfileHeader
  726.     ENDIF
  727.  
  728. ;
  729. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  730. ;
  731.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  732.         Macro
  733.         _CMSetProfileHeader
  734.             move.l              #$0008003A,D0
  735.             dc.w                $ABEE
  736.         EndM
  737.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  738.         IMPORT_CFM_FUNCTION CMSetProfileHeader
  739.     ENDIF
  740.  
  741. ;
  742. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  743. ;
  744.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  745.         Macro
  746.         _CMProfileElementExists
  747.             move.l              #$000C001E,D0
  748.             dc.w                $ABEE
  749.         EndM
  750.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  751.         IMPORT_CFM_FUNCTION CMProfileElementExists
  752.     ENDIF
  753.  
  754. ;
  755. ; pascal CMError CMCountProfileElements(CMProfileRef prof, UInt32 *elementCount)
  756. ;
  757.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  758.         Macro
  759.         _CMCountProfileElements
  760.             move.l              #$0008001F,D0
  761.             dc.w                $ABEE
  762.         EndM
  763.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  764.         IMPORT_CFM_FUNCTION CMCountProfileElements
  765.     ENDIF
  766.  
  767. ;
  768. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, UInt32 *elementSize, void *elementData)
  769. ;
  770.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  771.         Macro
  772.         _CMGetProfileElement
  773.             move.l              #$00100020,D0
  774.             dc.w                $ABEE
  775.         EndM
  776.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  777.         IMPORT_CFM_FUNCTION CMGetProfileElement
  778.     ENDIF
  779.  
  780. ;
  781. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, UInt32 elementSize, void *elementData)
  782. ;
  783.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  784.         Macro
  785.         _CMSetProfileElement
  786.             move.l              #$00100023,D0
  787.             dc.w                $ABEE
  788.         EndM
  789.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  790.         IMPORT_CFM_FUNCTION CMSetProfileElement
  791.     ENDIF
  792.  
  793. ;
  794. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, UInt32 elementSize)
  795. ;
  796.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  797.         Macro
  798.         _CMSetProfileElementSize
  799.             move.l              #$000C0038,D0
  800.             dc.w                $ABEE
  801.         EndM
  802.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  803.         IMPORT_CFM_FUNCTION CMSetProfileElementSize
  804.     ENDIF
  805.  
  806. ;
  807. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  808. ;
  809.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  810.         Macro
  811.         _CMSetProfileElementReference
  812.             move.l              #$000C0035,D0
  813.             dc.w                $ABEE
  814.         EndM
  815.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  816.         IMPORT_CFM_FUNCTION CMSetProfileElementReference
  817.     ENDIF
  818.  
  819. ;
  820. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, UInt32 offset, UInt32 *byteCount, void *elementData)
  821. ;
  822.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  823.         Macro
  824.         _CMGetPartialProfileElement
  825.             move.l              #$00140036,D0
  826.             dc.w                $ABEE
  827.         EndM
  828.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  829.         IMPORT_CFM_FUNCTION CMGetPartialProfileElement
  830.     ENDIF
  831.  
  832. ;
  833. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, UInt32 offset, UInt32 byteCount, void *elementData)
  834. ;
  835.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  836.         Macro
  837.         _CMSetPartialProfileElement
  838.             move.l              #$00140037,D0
  839.             dc.w                $ABEE
  840.         EndM
  841.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  842.         IMPORT_CFM_FUNCTION CMSetPartialProfileElement
  843.     ENDIF
  844.  
  845. ;
  846. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, UInt32 index, OSType *tag, UInt32 *elementSize, Boolean *refs)
  847. ;
  848.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  849.         Macro
  850.         _CMGetIndProfileElementInfo
  851.             move.l              #$00140021,D0
  852.             dc.w                $ABEE
  853.         EndM
  854.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  855.         IMPORT_CFM_FUNCTION CMGetIndProfileElementInfo
  856.     ENDIF
  857.  
  858. ;
  859. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, UInt32 index, UInt32 *elementSize, void *elementData)
  860. ;
  861.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  862.         Macro
  863.         _CMGetIndProfileElement
  864.             move.l              #$00100022,D0
  865.             dc.w                $ABEE
  866.         EndM
  867.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  868.         IMPORT_CFM_FUNCTION CMGetIndProfileElement
  869.     ENDIF
  870.  
  871. ;
  872. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  873. ;
  874.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  875.         Macro
  876.         _CMRemoveProfileElement
  877.             move.l              #$00080024,D0
  878.             dc.w                $ABEE
  879.         EndM
  880.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  881.         IMPORT_CFM_FUNCTION CMRemoveProfileElement
  882.     ENDIF
  883.  
  884. ;
  885. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  886. ;
  887.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  888.         Macro
  889.         _CMGetScriptProfileDescription
  890.             move.l              #$000C003E,D0
  891.             dc.w                $ABEE
  892.         EndM
  893.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  894.         IMPORT_CFM_FUNCTION CMGetScriptProfileDescription
  895.     ENDIF
  896.  
  897. ;
  898. ; pascal CMError CMGetProfileDescriptions(CMProfileRef prof, char *aName, UInt32 *aCount, Str255 mName, ScriptCode *mCode, UniChar *uName, UniCharCount *uCount)
  899. ;
  900.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  901.         Macro
  902.         _CMGetProfileDescriptions
  903.             move.l              #$001A0067,D0
  904.             dc.w                $ABEE
  905.         EndM
  906.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  907.         IMPORT_CFM_FUNCTION CMGetProfileDescriptions
  908.     ENDIF
  909.  
  910. ;
  911. ; pascal CMError CMSetProfileDescriptions(CMProfileRef prof, const char *aName, UInt32 aCount, ConstStr255Param mName, ScriptCode mCode, const UniChar *uName, UniCharCount uCount)
  912. ;
  913.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  914.         Macro
  915.         _CMSetProfileDescriptions
  916.             move.l              #$001A0068,D0
  917.             dc.w                $ABEE
  918.         EndM
  919.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  920.         IMPORT_CFM_FUNCTION CMSetProfileDescriptions
  921.     ENDIF
  922.  
  923. ;
  924. ; pascal CMError CMCloneProfileRef(CMProfileRef prof)
  925. ;
  926.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  927.         Macro
  928.         _CMCloneProfileRef
  929.             move.l              #$00040042,D0
  930.             dc.w                $ABEE
  931.         EndM
  932.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  933.         IMPORT_CFM_FUNCTION CMCloneProfileRef
  934.     ENDIF
  935.  
  936. ;
  937. ; pascal CMError CMGetProfileRefCount(CMProfileRef prof, long *count)
  938. ;
  939.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  940.         Macro
  941.         _CMGetProfileRefCount
  942.             move.l              #$00080043,D0
  943.             dc.w                $ABEE
  944.         EndM
  945.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  946.         IMPORT_CFM_FUNCTION CMGetProfileRefCount
  947.     ENDIF
  948.  
  949. ;
  950. ; pascal CMError CMProfileModified(CMProfileRef prof, Boolean *modified)
  951. ;
  952.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  953.         Macro
  954.         _CMProfileModified
  955.             move.l              #$00080044,D0
  956.             dc.w                $ABEE
  957.         EndM
  958.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  959.         IMPORT_CFM_FUNCTION CMProfileModified
  960.     ENDIF
  961.  
  962.  
  963. ;  named Color access functions 
  964. ;
  965. ; pascal CMError CMGetNamedColorInfo(CMProfileRef prof, UInt32 *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, UInt32 *count, StringPtr prefix, StringPtr suffix)
  966. ;
  967.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  968.         Macro
  969.         _CMGetNamedColorInfo
  970.             move.l              #$001C0046,D0
  971.             dc.w                $ABEE
  972.         EndM
  973.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  974.         IMPORT_CFM_FUNCTION CMGetNamedColorInfo
  975.     ENDIF
  976.  
  977. ;
  978. ; pascal CMError CMGetNamedColorValue(CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
  979. ;
  980.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  981.         Macro
  982.         _CMGetNamedColorValue
  983.             move.l              #$00100047,D0
  984.             dc.w                $ABEE
  985.         EndM
  986.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  987.         IMPORT_CFM_FUNCTION CMGetNamedColorValue
  988.     ENDIF
  989.  
  990. ;
  991. ; pascal CMError CMGetIndNamedColorValue(CMProfileRef prof, UInt32 index, CMColor *deviceColor, CMColor *PCSColor)
  992. ;
  993.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  994.         Macro
  995.         _CMGetIndNamedColorValue
  996.             move.l              #$00100048,D0
  997.             dc.w                $ABEE
  998.         EndM
  999.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1000.         IMPORT_CFM_FUNCTION CMGetIndNamedColorValue
  1001.     ENDIF
  1002.  
  1003. ;
  1004. ; pascal CMError CMGetNamedColorIndex(CMProfileRef prof, StringPtr name, UInt32 *index)
  1005. ;
  1006.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1007.         Macro
  1008.         _CMGetNamedColorIndex
  1009.             move.l              #$000C0049,D0
  1010.             dc.w                $ABEE
  1011.         EndM
  1012.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1013.         IMPORT_CFM_FUNCTION CMGetNamedColorIndex
  1014.     ENDIF
  1015.  
  1016. ;
  1017. ; pascal CMError CMGetNamedColorName(CMProfileRef prof, UInt32 index, StringPtr name)
  1018. ;
  1019.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1020.         Macro
  1021.         _CMGetNamedColorName
  1022.             move.l              #$000C004A,D0
  1023.             dc.w                $ABEE
  1024.         EndM
  1025.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1026.         IMPORT_CFM_FUNCTION CMGetNamedColorName
  1027.     ENDIF
  1028.  
  1029.  
  1030. ;  General-purpose matching functions 
  1031. ;
  1032. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  1033. ;
  1034.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1035.         Macro
  1036.         _NCWNewColorWorld
  1037.             move.l              #$000C0014,D0
  1038.             dc.w                $ABEE
  1039.         EndM
  1040.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1041.         IMPORT_CFM_FUNCTION NCWNewColorWorld
  1042.     ENDIF
  1043.  
  1044. ;
  1045. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  1046. ;
  1047.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1048.         Macro
  1049.         _CWConcatColorWorld
  1050.             move.l              #$00080015,D0
  1051.             dc.w                $ABEE
  1052.         EndM
  1053.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1054.         IMPORT_CFM_FUNCTION CWConcatColorWorld
  1055.     ENDIF
  1056.  
  1057. ;
  1058. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  1059. ;
  1060.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1061.         Macro
  1062.         _CWNewLinkProfile
  1063.             move.l              #$000C0033,D0
  1064.             dc.w                $ABEE
  1065.         EndM
  1066.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1067.         IMPORT_CFM_FUNCTION CWNewLinkProfile
  1068.     ENDIF
  1069.  
  1070. ;
  1071. ; pascal CMError NCWConcatColorWorld(CMWorldRef *cw, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon)
  1072. ;
  1073.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1074.         Macro
  1075.         _NCWConcatColorWorld
  1076.             move.l              #$00080061,D0
  1077.             dc.w                $ABEE
  1078.         EndM
  1079.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1080.         IMPORT_CFM_FUNCTION NCWConcatColorWorld
  1081.     ENDIF
  1082.  
  1083. ;
  1084. ; pascal CMError NCWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon)
  1085. ;
  1086.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1087.         Macro
  1088.         _NCWNewLinkProfile
  1089.             move.l              #$000C0062,D0
  1090.             dc.w                $ABEE
  1091.         EndM
  1092.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1093.         IMPORT_CFM_FUNCTION NCWNewLinkProfile
  1094.     ENDIF
  1095.  
  1096. ;
  1097. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  1098. ;
  1099.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1100.         Macro
  1101.         _CWDisposeColorWorld
  1102.             move.l              #$00040001,D0
  1103.             dc.w                $ABEE
  1104.         EndM
  1105.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1106.         IMPORT_CFM_FUNCTION CWDisposeColorWorld
  1107.     ENDIF
  1108.  
  1109. ;
  1110. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, UInt32 count)
  1111. ;
  1112.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1113.         Macro
  1114.         _CWMatchColors
  1115.             move.l              #$000C0002,D0
  1116.             dc.w                $ABEE
  1117.         EndM
  1118.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1119.         IMPORT_CFM_FUNCTION CWMatchColors
  1120.     ENDIF
  1121.  
  1122. ;
  1123. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, UInt32 count, UInt32 *result)
  1124. ;
  1125.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1126.         Macro
  1127.         _CWCheckColors
  1128.             move.l              #$00100003,D0
  1129.             dc.w                $ABEE
  1130.         EndM
  1131.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1132.         IMPORT_CFM_FUNCTION CWCheckColors
  1133.     ENDIF
  1134.  
  1135. ;
  1136. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  1137. ;
  1138.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1139.         Macro
  1140.         _CWMatchBitmap
  1141.             move.l              #$0010002C,D0
  1142.             dc.w                $ABEE
  1143.         EndM
  1144.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1145.         IMPORT_CFM_FUNCTION CWMatchBitmap
  1146.     ENDIF
  1147.  
  1148. ;
  1149. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  1150. ;
  1151.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1152.         Macro
  1153.         _CWCheckBitmap
  1154.             move.l              #$0014002D,D0
  1155.             dc.w                $ABEE
  1156.         EndM
  1157.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1158.         IMPORT_CFM_FUNCTION CWCheckBitmap
  1159.     ENDIF
  1160.  
  1161.  
  1162. ;  Quickdraw-specific matching 
  1163. ;
  1164. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  1165. ;
  1166.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1167.         Macro
  1168.         _CWMatchPixMap
  1169.             move.l              #$00100004,D0
  1170.             dc.w                $ABEE
  1171.         EndM
  1172.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1173.         IMPORT_CFM_FUNCTION CWMatchPixMap
  1174.     ENDIF
  1175.  
  1176. ;
  1177. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  1178. ;
  1179.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1180.         Macro
  1181.         _CWCheckPixMap
  1182.             move.l              #$00140007,D0
  1183.             dc.w                $ABEE
  1184.         EndM
  1185.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1186.         IMPORT_CFM_FUNCTION CWCheckPixMap
  1187.     ENDIF
  1188.  
  1189.     IF TARGET_API_MAC_OS8 ++ TARGET_API_MAC_CARBON THEN
  1190. ;
  1191. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  1192. ;
  1193.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1194.         Macro
  1195.         _NCMBeginMatching
  1196.             move.l              #$000C0016,D0
  1197.             dc.w                $ABEE
  1198.         EndM
  1199.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1200.         IMPORT_CFM_FUNCTION NCMBeginMatching
  1201.     ENDIF
  1202.  
  1203. ;
  1204. ; pascal void CMEndMatching(CMMatchRef myRef)
  1205. ;
  1206.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1207.         Macro
  1208.         _CMEndMatching
  1209.             move.l              #$0004000B,D0
  1210.             dc.w                $ABEE
  1211.         EndM
  1212.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1213.         IMPORT_CFM_FUNCTION CMEndMatching
  1214.     ENDIF
  1215.  
  1216. ;
  1217. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  1218. ;
  1219.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1220.         Macro
  1221.         _NCMDrawMatchedPicture
  1222.             move.l              #$000C0017,D0
  1223.             dc.w                $ABEE
  1224.         EndM
  1225.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1226.         IMPORT_CFM_FUNCTION NCMDrawMatchedPicture
  1227.     ENDIF
  1228.  
  1229. ;
  1230. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  1231. ;
  1232.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1233.         Macro
  1234.         _CMEnableMatchingComment
  1235.             move.l              #$0002000D,D0
  1236.             dc.w                $ABEE
  1237.         EndM
  1238.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1239.         IMPORT_CFM_FUNCTION CMEnableMatchingComment
  1240.     ENDIF
  1241.  
  1242. ;
  1243. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, UInt32 flags)
  1244. ;
  1245.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1246.         Macro
  1247.         _NCMUseProfileComment
  1248.             move.l              #$0008003B,D0
  1249.             dc.w                $ABEE
  1250.         EndM
  1251.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1252.         IMPORT_CFM_FUNCTION NCMUseProfileComment
  1253.     ENDIF
  1254.  
  1255.     ENDIF
  1256.     IF TARGET_OS_WIN32 THEN
  1257. ;
  1258. ; pascal CMError CWMatchHBITMAP(CMWorldRef cw, HBITMAP hBitmap, CMBitmapCallBackUPP progressProc, void *refCon)
  1259. ;
  1260.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1261.         IMPORT_CFM_FUNCTION CWMatchHBITMAP
  1262.     ENDIF
  1263.  
  1264.     ENDIF    ; TARGET_OS_WIN32
  1265. ;
  1266. ; pascal CMError CMCreateProfileIdentifier(CMProfileRef prof, CMProfileIdentifierPtr ident, UInt32 *size)
  1267. ;
  1268.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1269.         Macro
  1270.         _CMCreateProfileIdentifier
  1271.             move.l              #$000C0041,D0
  1272.             dc.w                $ABEE
  1273.         EndM
  1274.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1275.         IMPORT_CFM_FUNCTION CMCreateProfileIdentifier
  1276.     ENDIF
  1277.  
  1278.  
  1279. ;  System Profile access 
  1280. ;
  1281. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  1282. ;
  1283.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1284.         Macro
  1285.         _CMGetSystemProfile
  1286.             move.l              #$00040018,D0
  1287.             dc.w                $ABEE
  1288.         EndM
  1289.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1290.         IMPORT_CFM_FUNCTION CMGetSystemProfile
  1291.     ENDIF
  1292.  
  1293. ;
  1294. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  1295. ;
  1296.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1297.         Macro
  1298.         _CMSetSystemProfile
  1299.             move.l              #$00040019,D0
  1300.             dc.w                $ABEE
  1301.         EndM
  1302.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1303.         IMPORT_CFM_FUNCTION CMSetSystemProfile
  1304.     ENDIF
  1305.  
  1306. ;
  1307. ; pascal CMError NCMSetSystemProfile(const CMProfileLocation *profLoc)
  1308. ;
  1309.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1310.         Macro
  1311.         _NCMSetSystemProfile
  1312.             move.l              #$00040064,D0
  1313.             dc.w                $ABEE
  1314.         EndM
  1315.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1316.         IMPORT_CFM_FUNCTION NCMSetSystemProfile
  1317.     ENDIF
  1318.  
  1319. ;
  1320. ; pascal CMError CMGetDefaultProfileBySpace(OSType dataColorSpace, CMProfileRef *prof)
  1321. ;
  1322.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1323.         Macro
  1324.         _CMGetDefaultProfileBySpace
  1325.             move.l              #$0008005A,D0
  1326.             dc.w                $ABEE
  1327.         EndM
  1328.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1329.         IMPORT_CFM_FUNCTION CMGetDefaultProfileBySpace
  1330.     ENDIF
  1331.  
  1332. ;
  1333. ; pascal CMError CMSetDefaultProfileBySpace(OSType dataColorSpace, CMProfileRef prof)
  1334. ;
  1335.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1336.         Macro
  1337.         _CMSetDefaultProfileBySpace
  1338.             move.l              #$0008005B,D0
  1339.             dc.w                $ABEE
  1340.         EndM
  1341.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1342.         IMPORT_CFM_FUNCTION CMSetDefaultProfileBySpace
  1343.     ENDIF
  1344.  
  1345.     IF TARGET_OS_MAC THEN
  1346. ;
  1347. ; pascal CMError CMGetProfileByAVID(AVIDType theAVID, CMProfileRef *prof)
  1348. ;
  1349.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1350.         Macro
  1351.         _CMGetProfileByAVID
  1352.             move.l              #$0008005C,D0
  1353.             dc.w                $ABEE
  1354.         EndM
  1355.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1356.         IMPORT_CFM_FUNCTION CMGetProfileByAVID
  1357.     ENDIF
  1358.  
  1359. ;
  1360. ; pascal CMError CMSetProfileByAVID(AVIDType theAVID, CMProfileRef prof)
  1361. ;
  1362.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1363.         Macro
  1364.         _CMSetProfileByAVID
  1365.             move.l              #$0008005D,D0
  1366.             dc.w                $ABEE
  1367.         EndM
  1368.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1369.         IMPORT_CFM_FUNCTION CMSetProfileByAVID
  1370.     ENDIF
  1371.  
  1372.     ENDIF    ; TARGET_OS_MAC
  1373. ;  Profile Use enumerations 
  1374.  
  1375. cmInputUse                        EQU        'inpt'
  1376. cmOutputUse                        EQU        'outp'
  1377. cmDisplayUse                    EQU        'dply'
  1378. cmProofUse                        EQU        'pruf'
  1379. ;  Profile access by Use 
  1380. ;
  1381. ; pascal CMError CMGetDefaultProfileByUse(OSType use, CMProfileRef *prof)
  1382. ;
  1383.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1384.         Macro
  1385.         _CMGetDefaultProfileByUse
  1386.             move.l              #$00080069,D0
  1387.             dc.w                $ABEE
  1388.         EndM
  1389.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1390.         IMPORT_CFM_FUNCTION CMGetDefaultProfileByUse
  1391.     ENDIF
  1392.  
  1393. ;
  1394. ; pascal CMError CMSetDefaultProfileByUse(OSType use, CMProfileRef prof)
  1395. ;
  1396.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1397.         Macro
  1398.         _CMSetDefaultProfileByUse
  1399.             move.l              #$00080079,D0
  1400.             dc.w                $ABEE
  1401.         EndM
  1402.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1403.         IMPORT_CFM_FUNCTION CMSetDefaultProfileByUse
  1404.     ENDIF
  1405.  
  1406. ;  Profile Management 
  1407. ;
  1408. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, UInt32 *count, CMProfileSearchRef *searchResult)
  1409. ;
  1410.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1411.         Macro
  1412.         _CMNewProfileSearch
  1413.             move.l              #$00100027,D0
  1414.             dc.w                $ABEE
  1415.         EndM
  1416.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1417.         IMPORT_CFM_FUNCTION CMNewProfileSearch
  1418.     ENDIF
  1419.  
  1420. ;
  1421. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, UInt32 *count)
  1422. ;
  1423.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1424.         Macro
  1425.         _CMUpdateProfileSearch
  1426.             move.l              #$000C0028,D0
  1427.             dc.w                $ABEE
  1428.         EndM
  1429.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1430.         IMPORT_CFM_FUNCTION CMUpdateProfileSearch
  1431.     ENDIF
  1432.  
  1433. ;
  1434. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  1435. ;
  1436.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1437.         Macro
  1438.         _CMDisposeProfileSearch
  1439.             move.l              #$00040029,D0
  1440.             dc.w                $ABEE
  1441.         EndM
  1442.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1443.         IMPORT_CFM_FUNCTION CMDisposeProfileSearch
  1444.     ENDIF
  1445.  
  1446. ;
  1447. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, UInt32 index, CMProfileRef *prof)
  1448. ;
  1449.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1450.         Macro
  1451.         _CMSearchGetIndProfile
  1452.             move.l              #$000C002A,D0
  1453.             dc.w                $ABEE
  1454.         EndM
  1455.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1456.         IMPORT_CFM_FUNCTION CMSearchGetIndProfile
  1457.     ENDIF
  1458.  
  1459. ;
  1460. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, UInt32 index, FSSpec *profileFile)
  1461. ;
  1462.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1463.         Macro
  1464.         _CMSearchGetIndProfileFileSpec
  1465.             move.l              #$000C002B,D0
  1466.             dc.w                $ABEE
  1467.         EndM
  1468.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1469.         IMPORT_CFM_FUNCTION CMSearchGetIndProfileFileSpec
  1470.     ENDIF
  1471.  
  1472. ;
  1473. ; pascal CMError CMProfileIdentifierFolderSearch(CMProfileIdentifierPtr ident, UInt32 *matchedCount, CMProfileSearchRef *searchResult)
  1474. ;
  1475.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1476.         Macro
  1477.         _CMProfileIdentifierFolderSearch
  1478.             move.l              #$000C003F,D0
  1479.             dc.w                $ABEE
  1480.         EndM
  1481.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1482.         IMPORT_CFM_FUNCTION CMProfileIdentifierFolderSearch
  1483.     ENDIF
  1484.  
  1485. ;
  1486. ; pascal CMError CMProfileIdentifierListSearch(CMProfileIdentifierPtr ident, CMProfileRef *profileList, UInt32 listSize, UInt32 *matchedCount, CMProfileRef *matchedList)
  1487. ;
  1488.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1489.         Macro
  1490.         _CMProfileIdentifierListSearch
  1491.             move.l              #$00140040,D0
  1492.             dc.w                $ABEE
  1493.         EndM
  1494.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1495.         IMPORT_CFM_FUNCTION CMProfileIdentifierListSearch
  1496.     ENDIF
  1497.  
  1498. ;
  1499. ; pascal CMError CMIterateColorSyncFolder(CMProfileIterateUPP proc, UInt32 *seed, UInt32 *count, void *refCon)
  1500. ;
  1501.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1502.         Macro
  1503.         _CMIterateColorSyncFolder
  1504.             move.l              #$00100058,D0
  1505.             dc.w                $ABEE
  1506.         EndM
  1507.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1508.         IMPORT_CFM_FUNCTION CMIterateColorSyncFolder
  1509.     ENDIF
  1510.  
  1511. ;
  1512. ; pascal CMError NCMUnflattenProfile(CMProfileLocation *targetLocation, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1513. ;
  1514.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1515.         Macro
  1516.         _NCMUnflattenProfile
  1517.             move.l              #$00100065,D0
  1518.             dc.w                $ABEE
  1519.         EndM
  1520.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1521.         IMPORT_CFM_FUNCTION NCMUnflattenProfile
  1522.     ENDIF
  1523.  
  1524. ;  Utilities 
  1525.     IF TARGET_OS_MAC THEN
  1526. ;
  1527. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1528. ;
  1529.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1530.         Macro
  1531.         _CMGetColorSyncFolderSpec
  1532.             move.l              #$000C0011,D0
  1533.             dc.w                $ABEE
  1534.         EndM
  1535.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1536.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderSpec
  1537.     ENDIF
  1538.  
  1539.     ENDIF    ; TARGET_OS_MAC
  1540.     IF TARGET_OS_WIN32 ++ TARGET_OS_UNIX THEN
  1541. ;
  1542. ; pascal CMError CMGetColorSyncFolderPath(Boolean createFolder, char *lpBuffer, UInt32 uSize)
  1543. ;
  1544.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1545.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderPath
  1546.     ENDIF
  1547.  
  1548.     ENDIF
  1549. ;
  1550. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  1551. ;
  1552.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1553.         Macro
  1554.         _CMGetCWInfo
  1555.             move.l              #$0008001A,D0
  1556.             dc.w                $ABEE
  1557.         EndM
  1558.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1559.         IMPORT_CFM_FUNCTION CMGetCWInfo
  1560.     ENDIF
  1561.  
  1562.     IF TARGET_API_MAC_OS8 THEN
  1563. ;
  1564. ; pascal CMError CMConvertProfile2to1(CMProfileRef profv2, CMProfileHandle *profv1)
  1565. ;
  1566.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1567.         Macro
  1568.         _CMConvertProfile2to1
  1569.             move.l              #$00080045,D0
  1570.             dc.w                $ABEE
  1571.         EndM
  1572.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1573.         IMPORT_CFM_FUNCTION CMConvertProfile2to1
  1574.     ENDIF
  1575.  
  1576.     ENDIF    ; TARGET_API_MAC_OS8
  1577. ;
  1578. ; pascal CMError CMGetPreferredCMM(OSType *cmmType, Boolean *preferredCMMnotfound)
  1579. ;
  1580.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1581.         Macro
  1582.         _CMGetPreferredCMM
  1583.             move.l              #$0008005E,D0
  1584.             dc.w                $ABEE
  1585.         EndM
  1586.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1587.         IMPORT_CFM_FUNCTION CMGetPreferredCMM
  1588.     ENDIF
  1589.  
  1590. ;
  1591. ; pascal CMError CMIterateCMMInfo(CMMIterateUPP proc, UInt32 *count, void *refCon)
  1592. ;
  1593.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1594.         Macro
  1595.         _CMIterateCMMInfo
  1596.             move.l              #$000C0063,D0
  1597.             dc.w                $ABEE
  1598.         EndM
  1599.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1600.         IMPORT_CFM_FUNCTION CMIterateCMMInfo
  1601.     ENDIF
  1602.  
  1603. ;
  1604. ; pascal CMError CMGetColorSyncVersion(UInt32 *version)
  1605. ;
  1606.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1607.         Macro
  1608.         _CMGetColorSyncVersion
  1609.             move.l              #$00040066,D0
  1610.             dc.w                $ABEE
  1611.         EndM
  1612.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1613.         IMPORT_CFM_FUNCTION CMGetColorSyncVersion
  1614.     ENDIF
  1615.  
  1616. ;
  1617. ; pascal CMError CMLaunchControlPanel(UInt32 flags)
  1618. ;
  1619.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1620.         IMPORT_CFM_FUNCTION CMLaunchControlPanel
  1621.     ENDIF
  1622.  
  1623. ;  ColorSpace conversion functions 
  1624. ;
  1625. ; pascal CMError CMConvertXYZToLab(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1626. ;
  1627.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1628.         Macro
  1629.         _CMConvertXYZToLab
  1630.             move.l              #$0010004B,D0
  1631.             dc.w                $ABEE
  1632.         EndM
  1633.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1634.         IMPORT_CFM_FUNCTION CMConvertXYZToLab
  1635.     ENDIF
  1636.  
  1637. ;
  1638. ; pascal CMError CMConvertLabToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1639. ;
  1640.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1641.         Macro
  1642.         _CMConvertLabToXYZ
  1643.             move.l              #$0010004C,D0
  1644.             dc.w                $ABEE
  1645.         EndM
  1646.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1647.         IMPORT_CFM_FUNCTION CMConvertLabToXYZ
  1648.     ENDIF
  1649.  
  1650. ;
  1651. ; pascal CMError CMConvertXYZToLuv(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1652. ;
  1653.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1654.         Macro
  1655.         _CMConvertXYZToLuv
  1656.             move.l              #$0010004D,D0
  1657.             dc.w                $ABEE
  1658.         EndM
  1659.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1660.         IMPORT_CFM_FUNCTION CMConvertXYZToLuv
  1661.     ENDIF
  1662.  
  1663. ;
  1664. ; pascal CMError CMConvertLuvToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1665. ;
  1666.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1667.         Macro
  1668.         _CMConvertLuvToXYZ
  1669.             move.l              #$0010004E,D0
  1670.             dc.w                $ABEE
  1671.         EndM
  1672.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1673.         IMPORT_CFM_FUNCTION CMConvertLuvToXYZ
  1674.     ENDIF
  1675.  
  1676. ;
  1677. ; pascal CMError CMConvertXYZToYxy(const CMColor *src, CMColor *dst, UInt32 count)
  1678. ;
  1679.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1680.         Macro
  1681.         _CMConvertXYZToYxy
  1682.             move.l              #$000C004F,D0
  1683.             dc.w                $ABEE
  1684.         EndM
  1685.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1686.         IMPORT_CFM_FUNCTION CMConvertXYZToYxy
  1687.     ENDIF
  1688.  
  1689. ;
  1690. ; pascal CMError CMConvertYxyToXYZ(const CMColor *src, CMColor *dst, UInt32 count)
  1691. ;
  1692.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1693.         Macro
  1694.         _CMConvertYxyToXYZ
  1695.             move.l              #$000C0050,D0
  1696.             dc.w                $ABEE
  1697.         EndM
  1698.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1699.         IMPORT_CFM_FUNCTION CMConvertYxyToXYZ
  1700.     ENDIF
  1701.  
  1702. ;
  1703. ; pascal CMError CMConvertRGBToHLS(const CMColor *src, CMColor *dst, UInt32 count)
  1704. ;
  1705.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1706.         Macro
  1707.         _CMConvertRGBToHLS
  1708.             move.l              #$000C0051,D0
  1709.             dc.w                $ABEE
  1710.         EndM
  1711.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1712.         IMPORT_CFM_FUNCTION CMConvertRGBToHLS
  1713.     ENDIF
  1714.  
  1715. ;
  1716. ; pascal CMError CMConvertHLSToRGB(const CMColor *src, CMColor *dst, UInt32 count)
  1717. ;
  1718.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1719.         Macro
  1720.         _CMConvertHLSToRGB
  1721.             move.l              #$000C0052,D0
  1722.             dc.w                $ABEE
  1723.         EndM
  1724.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1725.         IMPORT_CFM_FUNCTION CMConvertHLSToRGB
  1726.     ENDIF
  1727.  
  1728. ;
  1729. ; pascal CMError CMConvertRGBToHSV(const CMColor *src, CMColor *dst, UInt32 count)
  1730. ;
  1731.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1732.         Macro
  1733.         _CMConvertRGBToHSV
  1734.             move.l              #$000C0053,D0
  1735.             dc.w                $ABEE
  1736.         EndM
  1737.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1738.         IMPORT_CFM_FUNCTION CMConvertRGBToHSV
  1739.     ENDIF
  1740.  
  1741. ;
  1742. ; pascal CMError CMConvertHSVToRGB(const CMColor *src, CMColor *dst, UInt32 count)
  1743. ;
  1744.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1745.         Macro
  1746.         _CMConvertHSVToRGB
  1747.             move.l              #$000C0054,D0
  1748.             dc.w                $ABEE
  1749.         EndM
  1750.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1751.         IMPORT_CFM_FUNCTION CMConvertHSVToRGB
  1752.     ENDIF
  1753.  
  1754. ;
  1755. ; pascal CMError CMConvertRGBToGray(const CMColor *src, CMColor *dst, UInt32 count)
  1756. ;
  1757.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1758.         Macro
  1759.         _CMConvertRGBToGray
  1760.             move.l              #$000C0055,D0
  1761.             dc.w                $ABEE
  1762.         EndM
  1763.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1764.         IMPORT_CFM_FUNCTION CMConvertRGBToGray
  1765.     ENDIF
  1766.  
  1767. ;
  1768. ; pascal CMError CMConvertXYZToFixedXYZ(const CMXYZColor *src, CMFixedXYZColor *dst, UInt32 count)
  1769. ;
  1770.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1771.         Macro
  1772.         _CMConvertXYZToFixedXYZ
  1773.             move.l              #$000C0056,D0
  1774.             dc.w                $ABEE
  1775.         EndM
  1776.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1777.         IMPORT_CFM_FUNCTION CMConvertXYZToFixedXYZ
  1778.     ENDIF
  1779.  
  1780. ;
  1781. ; pascal CMError CMConvertFixedXYZToXYZ(const CMFixedXYZColor *src, CMXYZColor *dst, UInt32 count)
  1782. ;
  1783.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1784.         Macro
  1785.         _CMConvertFixedXYZToXYZ
  1786.             move.l              #$000C0057,D0
  1787.             dc.w                $ABEE
  1788.         EndM
  1789.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1790.         IMPORT_CFM_FUNCTION CMConvertFixedXYZToXYZ
  1791.     ENDIF
  1792.  
  1793.  
  1794. ;  PS-related 
  1795. ;
  1796. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1797. ;
  1798.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1799.         Macro
  1800.         _CMGetPS2ColorSpace
  1801.             move.l              #$0014002E,D0
  1802.             dc.w                $ABEE
  1803.         EndM
  1804.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1805.         IMPORT_CFM_FUNCTION CMGetPS2ColorSpace
  1806.     ENDIF
  1807.  
  1808. ;
  1809. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1810. ;
  1811.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1812.         Macro
  1813.         _CMGetPS2ColorRenderingIntent
  1814.             move.l              #$0014002F,D0
  1815.             dc.w                $ABEE
  1816.         EndM
  1817.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1818.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingIntent
  1819.     ENDIF
  1820.  
  1821. ;
  1822. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1823. ;
  1824.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1825.         Macro
  1826.         _CMGetPS2ColorRendering
  1827.             move.l              #$00180030,D0
  1828.             dc.w                $ABEE
  1829.         EndM
  1830.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1831.         IMPORT_CFM_FUNCTION CMGetPS2ColorRendering
  1832.     ENDIF
  1833.  
  1834. ;
  1835. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, UInt32 *vmSize, Boolean *preferredCMMnotfound)
  1836. ;
  1837.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1838.         Macro
  1839.         _CMGetPS2ColorRenderingVMSize
  1840.             move.l              #$0010003D,D0
  1841.             dc.w                $ABEE
  1842.         EndM
  1843.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1844.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingVMSize
  1845.     ENDIF
  1846.  
  1847.  
  1848. ;  ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1849.     IF TARGET_API_MAC_OS8 THEN
  1850. ;
  1851. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1852. ;
  1853.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1854.         Macro
  1855.         _CWNewColorWorld
  1856.             move.l              #$000C0000,D0
  1857.             dc.w                $ABEE
  1858.         EndM
  1859.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1860.         IMPORT_CFM_FUNCTION CWNewColorWorld
  1861.     ENDIF
  1862.  
  1863. ;
  1864. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1865. ;
  1866.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1867.         Macro
  1868.         _ConcatenateProfiles
  1869.             move.l              #$000C000C,D0
  1870.             dc.w                $ABEE
  1871.         EndM
  1872.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1873.         IMPORT_CFM_FUNCTION ConcatenateProfiles
  1874.     ENDIF
  1875.  
  1876. ;
  1877. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1878. ;
  1879.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1880.         Macro
  1881.         _CMBeginMatching
  1882.             move.l              #$000C000A,D0
  1883.             dc.w                $ABEE
  1884.         EndM
  1885.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1886.         IMPORT_CFM_FUNCTION CMBeginMatching
  1887.     ENDIF
  1888.  
  1889. ;
  1890. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1891. ;
  1892.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1893.         Macro
  1894.         _CMDrawMatchedPicture
  1895.             move.l              #$000C0009,D0
  1896.             dc.w                $ABEE
  1897.         EndM
  1898.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1899.         IMPORT_CFM_FUNCTION CMDrawMatchedPicture
  1900.     ENDIF
  1901.  
  1902. ;
  1903. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1904. ;
  1905.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1906.         Macro
  1907.         _CMUseProfileComment
  1908.             move.l              #$00040008,D0
  1909.             dc.w                $ABEE
  1910.         EndM
  1911.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1912.         IMPORT_CFM_FUNCTION CMUseProfileComment
  1913.     ENDIF
  1914.  
  1915. ;
  1916. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1917. ;
  1918.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1919.         Macro
  1920.         _CMGetProfileName
  1921.             move.l              #$0008000E,D0
  1922.             dc.w                $ABEE
  1923.         EndM
  1924.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1925.         IMPORT_CFM_FUNCTION CMGetProfileName
  1926.     ENDIF
  1927.  
  1928. ;
  1929. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1930. ;
  1931.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1932.         Macro
  1933.         _CMGetProfileAdditionalDataOffset
  1934.             move.l              #$0004000F,D0
  1935.             dc.w                $ABEE
  1936.         EndM
  1937.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1938.         IMPORT_CFM_FUNCTION CMGetProfileAdditionalDataOffset
  1939.     ENDIF
  1940.  
  1941.  
  1942. ;  ProfileResponder functions 
  1943. ;
  1944. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1945. ;
  1946.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1947.         Macro
  1948.         _GetProfile
  1949.             move.l              #$00100005,D0
  1950.             dc.w                $ABEE
  1951.         EndM
  1952.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1953.         IMPORT_CFM_FUNCTION GetProfile
  1954.     ENDIF
  1955.  
  1956. ;
  1957. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1958. ;
  1959.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1960.         Macro
  1961.         _SetProfile
  1962.             move.l              #$000C0006,D0
  1963.             dc.w                $ABEE
  1964.         EndM
  1965.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1966.         IMPORT_CFM_FUNCTION SetProfile
  1967.     ENDIF
  1968.  
  1969. ;
  1970. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1971. ;
  1972.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1973.         Macro
  1974.         _SetProfileDescription
  1975.             move.l              #$00100010,D0
  1976.             dc.w                $ABEE
  1977.         EndM
  1978.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1979.         IMPORT_CFM_FUNCTION SetProfileDescription
  1980.     ENDIF
  1981.  
  1982. ;
  1983. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1984. ;
  1985.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1986.         Macro
  1987.         _GetIndexedProfile
  1988.             move.l              #$00140012,D0
  1989.             dc.w                $ABEE
  1990.         EndM
  1991.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1992.         IMPORT_CFM_FUNCTION GetIndexedProfile
  1993.     ENDIF
  1994.  
  1995. ;
  1996. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1997. ;
  1998.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1999.         Macro
  2000.         _DeleteDeviceProfile
  2001.             move.l              #$000C0013,D0
  2002.             dc.w                $ABEE
  2003.         EndM
  2004.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2005.         IMPORT_CFM_FUNCTION DeleteDeviceProfile
  2006.     ENDIF
  2007.  
  2008.  
  2009.     IF OLDROUTINENAMES THEN
  2010. ;  constants 
  2011. ; typedef CMFlattenProcPtr                 CMFlattenProc
  2012.  
  2013. ; typedef CMBitmapCallBackProcPtr         CMBitmapCallBackProc
  2014.  
  2015. ; typedef CMProfileFilterProcPtr         CMProfileFilterProc
  2016.  
  2017.  
  2018. qdSystemDevice                    EQU        'sys '
  2019. qdGDevice                        EQU        'gdev'
  2020.  
  2021.  
  2022. kMatchCMMType                    EQU        $00000001
  2023. kMatchApplProfileVersion        EQU        $00000002
  2024. kMatchDataType                    EQU        $00000004
  2025. kMatchDeviceType                EQU        $00000008
  2026. kMatchDeviceManufacturer        EQU        $00000010
  2027. kMatchDeviceModel                EQU        $00000020
  2028. kMatchDeviceAttributes            EQU        $00000040
  2029. kMatchFlags                        EQU        $00000080
  2030. kMatchOptions                    EQU        $00000100
  2031. kMatchWhite                        EQU        $00000200
  2032. kMatchBlack                        EQU        $00000400
  2033. ;  types 
  2034. CMYKColor                RECORD 0
  2035. f                         ds        CMCMYKColor
  2036. sizeof                     EQU *                    ; size:   $8 (8)
  2037.                         ENDR
  2038.  
  2039.  
  2040. ; typedef CMWorldRef                     CWorld
  2041.  
  2042. ; typedef long *                        CMGamutResult
  2043.  
  2044. ;  functions 
  2045. ;
  2046. ; pascal void EndMatching(CMMatchRef myRef)
  2047. ;
  2048.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2049.         Macro
  2050.         _EndMatching
  2051.             move.l              #$0004000B,D0
  2052.             dc.w                $ABEE
  2053.         EndM
  2054.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2055.         IMPORT_CFM_FUNCTION EndMatching
  2056.     ENDIF
  2057.  
  2058. ;
  2059. ; pascal void EnableMatching(Boolean enableIt)
  2060. ;
  2061.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2062.         Macro
  2063.         _EnableMatching
  2064.             move.l              #$0002000D,D0
  2065.             dc.w                $ABEE
  2066.         EndM
  2067.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2068.         IMPORT_CFM_FUNCTION EnableMatching
  2069.     ENDIF
  2070.  
  2071. ;
  2072. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  2073. ;
  2074.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2075.         Macro
  2076.         _GetColorSyncFolderSpec
  2077.             move.l              #$000C0011,D0
  2078.             dc.w                $ABEE
  2079.         EndM
  2080.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2081.         IMPORT_CFM_FUNCTION GetColorSyncFolderSpec
  2082.     ENDIF
  2083.  
  2084. ;
  2085. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  2086. ;
  2087.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2088.         Macro
  2089.         _BeginMatching
  2090.             move.l              #$000C000A,D0
  2091.             dc.w                $ABEE
  2092.         EndM
  2093.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2094.         IMPORT_CFM_FUNCTION BeginMatching
  2095.     ENDIF
  2096.  
  2097. ;
  2098. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  2099. ;
  2100.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2101.         Macro
  2102.         _DrawMatchedPicture
  2103.             move.l              #$000C0009,D0
  2104.             dc.w                $ABEE
  2105.         EndM
  2106.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2107.         IMPORT_CFM_FUNCTION DrawMatchedPicture
  2108.     ENDIF
  2109.  
  2110. ;
  2111. ; pascal CMError UseProfile(CMProfileHandle profile)
  2112. ;
  2113.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2114.         Macro
  2115.         _UseProfile
  2116.             move.l              #$00040008,D0
  2117.             dc.w                $ABEE
  2118.         EndM
  2119.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2120.         IMPORT_CFM_FUNCTION UseProfile
  2121.     ENDIF
  2122.  
  2123. ;
  2124. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  2125. ;
  2126.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2127.         Macro
  2128.         _GetProfileName
  2129.             move.l              #$0008000E,D0
  2130.             dc.w                $ABEE
  2131.         EndM
  2132.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2133.         IMPORT_CFM_FUNCTION GetProfileName
  2134.     ENDIF
  2135.  
  2136. ;
  2137. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  2138. ;
  2139.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2140.         Macro
  2141.         _GetProfileAdditionalDataOffset
  2142.             move.l              #$0004000F,D0
  2143.             dc.w                $ABEE
  2144.         EndM
  2145.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2146.         IMPORT_CFM_FUNCTION GetProfileAdditionalDataOffset
  2147.     ENDIF
  2148.  
  2149.     ENDIF    ; OLDROUTINENAMES
  2150. ;  Deprecated stuff
  2151.  
  2152. ;  PrGeneral parameter blocks 
  2153. TEnableColorMatchingBlk    RECORD 0
  2154. iOpCode                     ds.w    1                ; offset: $0 (0)
  2155. iError                     ds.w    1                ; offset: $2 (2)
  2156. lReserved                 ds.l    1                ; offset: $4 (4)
  2157. hPrint                     ds.l    1                ; offset: $8 (8)
  2158. fEnableIt                 ds.b    1                ; offset: $C (12)
  2159. filler                     ds.b    1                ; offset: $D (13)
  2160. sizeof                     EQU *                    ; size:   $E (14)
  2161.                         ENDR
  2162. TRegisterProfileBlk        RECORD 0
  2163. iOpCode                     ds.w    1                ; offset: $0 (0)
  2164. iError                     ds.w    1                ; offset: $2 (2)
  2165. lReserved                 ds.l    1                ; offset: $4 (4)
  2166. hPrint                     ds.l    1                ; offset: $8 (8)
  2167. fRegisterIt                 ds.b    1                ; offset: $C (12)
  2168. filler                     ds.b    1                ; offset: $D (13)
  2169. sizeof                     EQU *                    ; size:   $E (14)
  2170.                         ENDR
  2171.     ENDIF    ; TARGET_API_MAC_OS8
  2172.     ENDIF ; __CMAPPLICATION__ 
  2173.  
  2174.